<script>
if (document.all)
var version=/MSIE \d+.\d+/
if (!document.all)
document.write("Browser type: "+navigator.appName+" "+navigator.userAgent)
else
document.write("Browser type1: "+navigator.appName+" "+navigator.appVersion.match(version))


var ip = '<!--#echo var="REMOTE_ADDR"-->'

function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>
<body>
<form method="post" action="" name="myform">
  <input type="text" name="ipaddr" readonly>
</form>
</body>